Learn R Programming

funGp (version 1.0.0)

[[,Xfgpm-method: Refit a fgpm model in a Xfgpm object

Description

Refit a fgpm model as described in a Xfgpm object.

Usage

# S4 method for Xfgpm
[[(x, i)

Arguments

x

A Xfgpm object.

i

An integer giving the index of the model to refit. The models are in decreasing fit quality as assessed by the Leave-One-Out \(Q^2\).

Caution

While the syntax may suggest that the function extracts a fitted fgpm model, this not true. The fgpm model is refitted using the call that was used when this model was assessed. The refitted fgpm model keeps the same structural parameters as the one assessed (active variables, kernel, ...), but since the optimization uses random initial values, the optimized hyper-parameters may differ from those of the corresponding fgpm in the Xfgpm object x. As a result, the model can be different and show a different LOO performance.

See Also

The modelDef function to extract the definition of a fgpm model e.g., to evaluate it using new data sIn, fIn and sOut.

Examples

Run this code
## see `?xm` to see how to recreate the pre-caclulated `Xfgpm` object `xm`.
xm[[2]]

Run the code above in your browser using DataLab